home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000…tember: Reference Library / Dev.CD Sep 00 RL Disk 1.toast / mac / Technical Documentation / Develop / develop Issue 28 / develop Issue 28 code / MacApp Debugging / TwistDownLists / MTwist Down Lists.cp < prev    next >
Encoding:
Text File  |  1996-07-15  |  2.7 KB  |  130 lines  |  [TEXT/MPS ]

  1. //----------------------------------------------------------------------------------------
  2. // MTwist Down Lists.cp
  3. // ETO20 MacApp 3.3.1, MPW 3.4.1
  4. // Copyright ©1994-1996 Conrad Kopala
  5. // Twist Down Lists version 2.0a0 7/15/96
  6. //----------------------------------------------------------------------------------------
  7.  
  8. #ifndef __UTWISTDOWNGLOBALS__
  9. #include "UTwistDownGlobals.h"
  10. #endif
  11.  
  12. #ifndef __UTWISTDOWNAPP__
  13. #include "UTwistDownApp.h"
  14. #endif
  15.  
  16. #ifndef __UVOLUMEBASEDAPP__
  17. #include "UVolumeBasedApp.h"
  18. #endif
  19.  
  20. #ifndef __UTWISTDOWNCONTROL__
  21. #include "UTwistDownControl.h"
  22. #endif
  23.  
  24. #ifndef __UTWISTDOWNVIEW__
  25. #include "UTwistDownView.h"
  26. #endif
  27.  
  28. #ifndef __UPROGRESSDIALOG__
  29. #include "UProgressIndicators.h"
  30. #endif
  31.  
  32. //MacApp stuff
  33.  
  34. #ifndef __UDEBUG__
  35. #include "UDebug.h"
  36. #endif
  37.  
  38. #ifndef __UPRINTING__
  39. #include "UPrinting.h"
  40. #endif
  41.  
  42. #ifndef __UMACAPPUTILITIES__
  43. #include "UMacAppUtilities.h"
  44. #endif
  45.  
  46. #ifndef __UERRORMGR__
  47. #include "UErrorMgr.h"
  48. #endif
  49.  
  50. #ifndef __UDIALOG__
  51. #include "UDialog.h"
  52. #endif
  53.  
  54. #ifndef __UGRIDVIEW__
  55. #include "UGridView.h"
  56. #endif
  57.  
  58. #ifndef __UMACAPPGLOBALS__
  59. #include "UMacAppGlobals.h"
  60. #endif
  61.  
  62. //ToolBox stuff
  63. //None
  64.  
  65. //ANSI stuff
  66. //None
  67.  
  68. // Generate universal code
  69. #pragma push
  70. #pragma processor 68000
  71.  
  72. //----------------------------------------------------------------------------------------
  73. // main: 
  74. //----------------------------------------------------------------------------------------
  75. #pragma segment Main
  76.  
  77. void main ()
  78. {
  79.  
  80. #if qDebug
  81.     InitUDebugGlobals();
  82. //InitUDebugGlobals() sets the following global. 
  83.     gObjectCount = 0;
  84. //InitUDebugGlobals() sets the following globals to FALSE. You may want to change
  85. //their initial values as I do with gObjectCountingEnabled.
  86.     gObjectCountingEnabled = TRUE;
  87.     gPrintBaseClassInfo = FALSE;
  88.     gPrintMacAppClassInfo = FALSE;     //To watch MacApp start up, set this to true.
  89.     gPrintAppClassInfo = FALSE;            //To watch your app start up, set this to true.
  90.     gAppUserFlag1 = FALSE;
  91.     gAppUserFlag2 = FALSE;
  92.     gAppUserFlag3 = FALSE;
  93. #endif
  94.  
  95.     gFailHere = FALSE;
  96.     
  97.     InitUMacApp(64);
  98.     gOHRemainingIncrements = InitMaxObjectHeapSize();
  99.  
  100.     InitUTEView();
  101.     InitUGridView();
  102.     InitUPrinting();
  103.     InitUDialog();
  104.  
  105.     InitUTwistDownControl();    
  106.     InitUTwistDownView();
  107.     InitUProgressDialog();
  108.  
  109.     TTwistDownApp* aTwistDownApp = NULL;
  110.     aTwistDownApp = new TTwistDownApp;
  111.     aTwistDownApp -> ITwistDownApp(kHasSplashScreen);
  112.     
  113.     aTwistDownApp -> Run();
  114.     
  115. /*    
  116. #if qDebug
  117. //I use this to give me a count of the objects just before the app terminates.
  118. //Generally, you would expect that count to be the same as it is just after the
  119. //app enters MainEventLoop. It isn't. MacApp doesn't free everything when an
  120. //application terminates.
  121. fprintf(stderr, "Main after Run");
  122. PrintObjectCount();
  123. fprintf(stderr, "\n");
  124. #endif    
  125. */
  126.  
  127. }
  128.  
  129. #pragma pop
  130. #pragma segment Inline